//
//  CPYAFNetTool.h
//  Summer
//
//  Created by chenpengyu on 16/3/7.
//  Copyright © 2016年 cpy. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void(^BlockOfSuccess) (id result);

typedef NS_ENUM(NSInteger, CPYResponseStyle) {
    CPYJSON,
    CPYXML,
    CPYDATA,
};
typedef NS_ENUM(NSUInteger, CPYRequestStyle) {
    CPYrequestJSON,
    CPYRequestString,
};

@interface CPYAFNetTool : NSObject

+ (void)GETNetWithUrl:(NSString *)url body:(id)body headerFile:(NSDictionary *)header response:(CPYResponseStyle)responseStyle success:(BlockOfSuccess)success failure:(void (^)(NSError * error))failure;

+ (void)POSTNetWithUrl:(NSString *)url body:(id)body bodyStyle:(CPYRequestStyle)bodyStyle headerFile:(NSDictionary *)header response:(CPYResponseStyle)responseStyle success:(BlockOfSuccess)success failure:(void (^)(NSError * error))failure;




@end
